package cn.itsource.ymcc.client;

import cn.itsource.ymcc.domain.CourseDoc;
import cn.itsource.ymcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "service-es",fallbackFactory = ESFeignClientFallbackFactory.class)
public interface ESFeignClient {
    @PostMapping("/saveCourse")
    JsonResult saveCourse(@RequestBody CourseDoc courseDoc);

    @DeleteMapping("/delCourse/{id}")
    JsonResult delCourse(@PathVariable("id")Long id);

    @GetMapping("/findCourseDocByCourseId/{courseId}")
    JsonResult findCourseDocByCourseId(@PathVariable("courseId")Long courseId);

    @PostMapping("/findCourseDocByCourseIds")
    JsonResult findCourseDocByCourseIds(@RequestBody List<Long> courseIds);
}
